﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Bordspil.Models
{
    public class HighscoreRepository : IHighscoreRepository
    {
        private AppDataContext m_db = new AppDataContext();

        public IEnumerable<Highscore> GetHighscoreInGame(string gameName)
        {
            throw new NotImplementedException();
        }

        public void UpdateScoresInGame(string gameName, int? userId)
        {
            throw new NotImplementedException();
        }

        public IEnumerable<Highscore> GetAllHighscore()
        {
            return m_db.Highscore;
        }

        public void UpdateScore(Highscore h)
        {
            m_db.Highscore.Add(h);
        }

        public void Save()
        {
            m_db.SaveChanges();
        }
    }
}